﻿#ifndef COMMON_H
#define COMMON_H


//# define CPMTIME  //也是测试的时候 用一些输出函数
# define YOUHUA1 //某论文说，对于距离比较短的节点路径的寻找，可以选定一个大致矩形区域，超出矩形区域的不考虑
# include<iostream>
# include<list>
# include<algorithm>
# include<vector>
# include<set>
# include<map>
# include <queue>
# include<fstream>
# include<cmath>
# include<string>
# include<cassert>
using namespace std;

class LinkNode
{
public: 
	int count;
	list<int> link;

};


//
struct NodeEntityInfo
{
	//int RoadId;//
	int StartId;// 道路的开始节点
	int EndId;//道路的终止节点
	double Length;
	int Classic;
	int Direct;
};



class CostNode
{
public:
	int p; // 父亲节点
	double sum;// 总的花费
	double dist;// 已经花费的
	CostNode(int _p,double _dist,double _sum = 0.0)
	{
		this->p = _p;
		this->dist = _dist;
		this->sum = _sum;
	}
	void toCostNode(int _p,double _dist,double _sum = 0.0)
	{
		this->p = _p;
		this->dist = _dist;
		this->sum = _sum;
	}

};
//存储每个节点的信息  
class NodeInfo
{
public:
	double x;
	double y;
	int Direct;
	NodeInfo()
	{
		x = 0.0;
		y = 0.0;
		Direct = 1;
	}
	NodeInfo(double _x,double _y,int _direct = 1)
	{
		x = _x;
		y = _y;
		Direct = _direct;
	}
};




// 加一个结构  startid -- roadid 的对应关系
// 因为之前写的程序没有考虑这个 。

//vector <int> startMapRoad;
map<string ,int> startMapRoad;
#endif